home *** CD-ROM | disk | FTP | other *** search
/ The X-Philes (2nd Revision) / The X-Philes Number 1 (1995).iso / xphiles / hp48_2 / six_leve.sta < prev    next >
Text File  |  1995-03-23  |  3KB  |  60 lines

  1. Article 116 of comp.sys.handhelds:
  2. Path: en.ecn.purdue.edu!noose.ecn.purdue.edu!samsung!zaphod.mps.ohio-state.edu!usc!apple!portal!cup.portal.com!Jake-S
  3. From: Jake-S@cup.portal.com (Jake G Schwartz)
  4. Newsgroups: comp.sys.handhelds
  5. Subject: HP48 6-Level Stack Display
  6. Message-ID: <29379@cup.portal.com>
  7. Date: 28 Apr 90 01:05:08 GMT
  8. Organization: The Portal System (TM)
  9. Lines: 47
  10.  
  11.  
  12.      An HP48 Six-Level Stack Display Using Vectored Enter
  13.     ------------------------------------------------------
  14.  
  15.      The HP48SX vectored ENTER capability is useful when modifications
  16. must be done immediately before or after a command line is processed.
  17. Previous examples mentioned on Usenet include (1) the automatic conversion
  18. of real numbers to binary integers (using <alpha>ENTER to add the # symbol
  19. in front) and (2) simulating the TRACE mode for the HP82240 printer (by
  20. having <beta>ENTER perform a PR1 or PRSTK after each keystroke which per-
  21. forms an automatic ENTER).
  22.      Here is a use for <beta>ENTER which overwrites the display status 
  23. area with the values of stack levels 5 and 6 following each parsing of the 
  24. command line.  (Having stack level one multi-line mode turned OFF guarantees
  25. that all six levels will always be displayed.)  Enter the program below
  26. and store it as <beta>ENTER (where <beta> is the right shifted B) in the
  27. HOME directory; set flags -62 (USER mode) and -63; and at the end of each
  28. keystroke which parses the command line the program will automatically
  29. display the values of stack levels 5 and 6.
  30.  
  31.                                           Jake Schwartz
  32.                                           135 Saxby Terr
  33.                                           Cherry Hill NJ 08003
  34.                                           609-751-1310   home
  35.                                           609-866-6268   work
  36.  
  37.  
  38. <beta>ENTER:
  39. ------------
  40.  
  41. %%HP: T(3)A(D)F(.);
  42. \<< DROP                   @ drops the command line converted to string
  43. "6:                   "    @ initial 21-character string for line 6
  44.   IF DEPTH 7 \>=           @ if stack level 6 exists
  45.   THEN 7 PICK \->STR       @    get it and convert to a string
  46.   ELSE ""                  @    otherwise use a null string
  47.   END 23 OVER SIZE         @ get size of object string
  48. - 3 MAX SWAP REPL 1        @ position it right-justified in display string
  49. DISP                       @ display in line one of LCD
  50. "5:                   "    @ -- repeat
  51.   IF DEPTH 6 \>=           @    the same
  52.   THEN 6 PICK \->STR       @    process
  53.   ELSE ""                  @    for
  54.   END 23 OVER SIZE         @    stack
  55. - 3 MAX SWAP REPL 2        @    level 5 --
  56. DISP 1 FREEZE              @ and freeze the status area of the LCD
  57. \>>
  58.  
  59.  
  60.